package com.utils2;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * @author LWY
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class City {
    String cityName;
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    Date createTime;
    int total;
    CityData cityData;

    public int getTotal() {
        return this.cityData.confirmed+this.cityData.recovered+this.cityData.deaths;
    }
}
